<?php
	
	//set le titre drupal
	drupal_set_title('Emprunt d\'un album');
	
	//ajoute le JS pour cette vue
	if (isset($listUser))
	{
		$js = 'var listUser = ["';
		foreach($listUser as $_user)
			$js.= $_user['lastname'].' '.$_user['firstname'].' ('.$_user['email'].')","';
		if (count($listUser))
			$js = substr($js,0, strlen($js)-3);
		$js.='"];';
		drupal_add_js($js, 'inline');
	}
	drupal_add_js('bdbdec/view/scripts/jQueryAutocomplete.js');
	drupal_add_js('bdbdec/view/scripts/borrow.js');
	
	//ajoute le CSS pour la vue
	drupal_add_css('bdbdec/view/css/autocomplete.css');    
	drupal_add_css('bdbdec/view/css/borrow.css');
			
	//rend la vue
	echo '
	<div class="borrowSelectUser"> 
		Entrez le nom de l\'utilisateur <br />
		<form action="./bdbdec.php?action=borrowStep2" method="post">
			<input class="inputName" type="text" name="username" id="username" /><br /><br />
			<input class="validName" type="submit" name="validname">
		</form>
	</div>';

?>
